% V20210224 - 11.15 Changing Spinner Text INCLUDE "GW.bas" % Create a page. p = GW_NEW_PAGE() % Prepare title bar string. Title$ = GW_ADD_BAR_TITLE$("Change Spinner Text") % Add title to page. GW_ADD_TITLEBAR(p, Title$) % Add descriptive text. GW_ADD_TEXT(p, "A spinner is automatically loaded, and its values are changing while an operation takes place.") GW_ADD_TEXT(p, "Hit the back key to cancel the operation and exit, or wait patiently.") % Let's prepare the spinner. spin = GW_ADD_SPINNER(p, "Ready, set...") % Now show the page. GW_RENDER(p) % And display the spinner! GW_SHOW_SPINNER(spin) % Simulate a long operation. FOR i = 1 TO 123 % Change the spinner text GW_MODIFY(spin, "text", "Analyzing file #" + INT$(i)) % Do a random pause varying between 100 ms and 1.5 s PAUSE INT(14*RND()+1) * 100 % Cancel and exit if the user hits the Back Key. IF GW_ACTION$() = "BACK" THEN END "End of Change Spinner Text example. Interrupted by user." NEXT END "End of Change Spinner Text example. You got patience!"